import request from "@/utils/request"

export const getPricesApi = (params = {}) => {
    return request.get('/price_rule/', { params })
}

export const createPriceApi = (data) => {
    return request.post('/price_rule/', data)
}

export const updatePriceApi = (data) => {
    return request.patch(`/price_rule/`, data)
}

export const deletePriceApi = (data) => {
    return request.delete(`/price_rule/`, {
        data
    })
}

//区域绑定计费规则
export const bindPriceApi = (data) => {
    return request.put('/price_rule/', data)
}

//获取价格
export const getPriceDetailApi = (params) => {
    return request.get('/price/', { params })
}